//logs.js
const util = require('../../utils/util.js')
const request = require('../../lib/request.js');
const api = require('../../lib/api.js');
import { login, detail } from '../../lib/server'

Page({
  data: {
    logs: [],
    orderTypeList:[
      {img:'../../image/icon_mypage_daizhifu.png', name:'待支付',type:'all'},
      {img:'../../image/icon_mypage_daizhifu.png', name:'待支付',type:'all'},
      {img:'../../image/icon_mypage_daizhifu.png', name:'待支付',type:'all'},
      {img:'../../image/icon_mypage_daizhifu.png', name:'待支付',type:'all'},
      {img:'../../image/icon_mypage_daizhifu.png', name:'待支付',type:'all'},
    ],
    userInfo:wx.getStorageSync('user')
  },
  onLoad: function () {
    this.getUserInfo()
  },
  // 订单状态点击事件
  orderOnclick: (event) => {
    // console.log(event)
    console.log(event.currentTarget.dataset.type)
  },

  getUserInfo: function() {
    detail({},{
      success:data => {
        console.log(data);
        this.setData({
          userInfo:data.user
        })
      }
    })
  },
  viewChange: (event) => {
    console.log(event.detail)
  }
})
